/**
 * @Title: DateUtil
 * @Package cn.com.artemis.yqpay.utils
 * @Description: TODO
 * Copyright: Copyright (c) 2016
 * Company: 成都壹柒互动科技有限公司
 * @author 会员系统组-胥钰淋
 * @date 2016/12/30 15:31
 * @version V1.0
 */
package cn.com.yiqi.wsc.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 *
 *@ClassName: DateUtil
 * @Description: TODO
 * @author 会员系统组-胥钰淋
 * @date 2016/12/30 15:31
 *
 */
public class DateUtil {

    public static String dateToString(String parttern, Date date) {
        SimpleDateFormat sf = new SimpleDateFormat(parttern);
        return sf.format(date);
    }

    public static Date stringToDate(String parttern, String date) throws ParseException {
        SimpleDateFormat sf = new SimpleDateFormat(parttern);
        return sf.parse(date);
    }

}
